Skip to content

0.5.0: portable single exe (.NET Framework 4.8) - #1

Merged
ZanderH-code merged 6 commits into
mainfrom
portable-net48
Nov 23, 2026
Merged

ZanderH-code merged 6 commits into
mainfrom
portable-net48

Conversation

@ZanderH-code

Copy link
Copy Markdown
Owner

Summary

Ship a single portable VolumeBridge.exe targeting in-box .NET Framework 4.8 (~1 MB instead of the 67 MB self-contained .NET 8 Inno Setup installer).

  • net48 retarget & single-file embedding: Retargeted VolumeBridge.csproj to net48 (x64, PolySharp, ReferenceAssemblies, embedded PDB), embedded NAudio.Core + NAudio.Wasapi loaded via AppDomain.AssemblyResolve, embedded VolumeBridgeApo.dll via -p:ApoDll=..., replaced System.Text.Json with MiniJson.
  • In-app plugin deploy/remove: --apo-setup checks for legacy Inno Setup install (64-bit uninstall key), extracts versioned VolumeBridgeApo-<8hex>.dll to %ProgramFiles%\VolumeBridge, runs regsvr32 /s, installs APO registry entries, and cleans up old DLLs (delay-until-reboot if locked). Added --apo-remove + Remove plugin button, and outdated-plugin detection (Update plugin).
  • Paths, language, autostart: AppPaths.DataDir always uses %LOCALAPPDATA%\VolumeBridge; removed installer-language file; autostart silently updates the Task Scheduler path if the exe moved.
  • Self-update: Single-exe in-place swap (VolumeBridge.exe + VolumeBridge.exe.sha256) with rollback, writability check, --updated 15 s mutex wait, and background .old cleanup.
  • CI & docs: Updated .github/workflows/build.yml (APO build, tests, net48 build, single-exe ≤ 5 MB gate, .sha256 + release assets), removed installer/, updated THIRD-PARTY-NOTICES.md, README.md, README.zh-CN.md, docs/release-notes.md, and docs/PLAN.md.

ZanderH-code and others added 6 commits November 23, 2026 16:12
- Retarget VolumeBridge.csproj to net48 (x64, embedded PDB, PolySharp,
  Microsoft.NETFramework.ReferenceAssemblies, embed NAudio & optional APO DLL)
- Add app.manifest for PerMonitorV2 DPI and Windows 10/11 compatibility
- Replace System.Text.Json with self-contained MiniJson for zero runtime DLLs
- Simplify AppPaths.DataDir to always use %LOCALAPPDATA%\VolumeBridge
- Remove installer-language file logic from Loc
- Update UpdateCheck assets to VolumeBridge.exe / VolumeBridge.exe.sha256

Co-Authored-By: Gemini 4 Neon <[email protected]>
…ader

- Port Program.cs, Audio/*, and Ui/* from .NET 8 APIs to .NET Framework 4.8
  (DllImport, Application.ExecutablePath, GetTickCount64, FormattableString.Invariant,
  ServiceController.Stop, quoted schtasks arguments, WaitForExit)
- Register AppDomain.AssemblyResolve as the first line in Main with a NoInlining
  Run() method to load embedded NAudio.Core and NAudio.Wasapi DLLs
- Set GenerateSupportedRuntime=false so build output is solely VolumeBridge.exe
- Sync Task Scheduler autostart exe path on startup if the portable exe moved

Co-Authored-By: Gemini 4 Neon <[email protected]>
- Refuse --apo-setup when the legacy Inno Setup uninstall key is present
  (64-bit view), and show a clear uninstall prompt in MainForm
- Extract embedded VolumeBridgeApo.dll to versioned path
  %ProgramFiles%\VolumeBridge\VolumeBridgeApo-<8hex>.dll, register via
  regsvr32 /s, ensure %ProgramData%\VolumeBridge ACL, and clean up old
  DLLs (MoveFileEx MOVEFILE_DELAY_UNTIL_REBOOT if locked)
- Add --apo-remove full cleanup (restore FxProperties + audio setting,
  regsvr32 /u /s, delete DLLs/empty dir/empty HKLM state key) and
  Remove plugin button with confirmation + autostart removal
- Detect outdated registered APO DLL (SHA-256 mismatch vs embedded) and
  switch Enable button to Update plugin

Co-Authored-By: Gemini 4 Neon <[email protected]>
- Replace Inno Setup silent update with in-place exe swap: verify folder
  writability (fall back to opening release page), download + SHA-256
  verify, rename running exe to <exe>.old, copy new exe in place, launch
  with --updated, and roll back on failure
- Wait up to 15 s for the single-instance mutex on --updated while the
  previous instance exits, and clean up <exe>.old + temp downloads in
  the background with retries
- Remove installer-only Global\VolumeBridge.Updating mutex handling

Co-Authored-By: Gemini 4 Neon <[email protected]>
…0.5.0

- Update .github/workflows/build.yml to embed built VolumeBridgeApo.dll,
  gate dist to solely VolumeBridge.exe <= 5 MB, generate .sha256, and
  publish the two new release assets (removing Inno Setup)
- Delete installer/ directory
- Add PolySharp (build-time only, MIT) to THIRD-PARTY-NOTICES.md
- Update README.md, README.zh-CN.md, docs/release-notes.md, and docs/PLAN.md
  for 0.5.0 portable single exe

Co-Authored-By: Gemini 4 Neon <[email protected]>
@ZanderH-code
ZanderH-code marked this pull request as ready for review November 23, 2026 21:32
@ZanderH-code
ZanderH-code merged commit fa26941 into main Nov 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant